<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = [5, 10, 20, 40, 80, 100]
        let newArr = arr.map((item, index) => {
            if (item > 40) {
                return 'good'
            } else {
                return 'bad'
            }
        })
        console.log(newArr)

        let price = [99, 50, 80, 66, 45] //先涨价 再打折
        let result = price.map(item => item * 1.3).map(item => item * 0.8)
        console.log(result)

        console.log(result.filter(item => item > 80))
    </script>
</body>

</html>